import 'package:flutter/material.dart';

class LearnBaseRouterAPage extends StatefulWidget {
  const LearnBaseRouterAPage({super.key});
  @override
  State<LearnBaseRouterAPage> createState() => _LearnBaseRouterAPageState();
}

class _LearnBaseRouterAPageState extends State<LearnBaseRouterAPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text("A页面"),
      ),
      body:Center(
        child:Column(
          children: [
            TextButton(onPressed:()=>{
              Navigator.pop(context)
            }, child: const Text("返回")),
            TextButton(onPressed:()=>{
              Navigator.pushNamed(context, '/B')
            }, child:const Text("B页面")),
          ],
        ),
      )
      // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
